﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using WPFExcelReport.Helpers;
using System.ComponentModel;
 
namespace WPFExcelReport
{
    public partial class TAB05HS
    {        
       
        public TAB05HS()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VABPOS();
            DataContext = MV;
            InitializeComponent();
           
        }
        
         public override void vwMaster_CurrentChanged(object sender, EventArgs e)
        {
            base.vwMaster_CurrentChanged(sender, e);
            
        }
        
        public override void LOADBYAUF()
        {
            TBMain.Clear();
            if (ORDERNUM.Length < 12)
                return;
            dwData["ABPMANDANT"] = app.Mandant;
            dwData["ABPAUFKRS"] = ORDERNUM.Substring(1, 2);
            dwData["ABPAUFLFD"] = ORDERNUM.Substring(3, 6);
            dwData["ABPAUFPOS"] = ORDERNUM.Substring(9, 3);
            SResult = TMV.QABP31(dwData);
            MergeData(SResult, true);
            base.LOADBYAUF();
        } 
    }
}
